
<!DOCTYPE html>
<!--

    Copyright (c) 2017, 2019 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->
<!-- Portions Copyright [2019] [Payara Foundation and/or its affiliates] -->
<html lang="en">
  <head>
    <meta charset="utf-8"/>
    <title>change-admin-password</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="css/style.css" rel="stylesheet">
    <script src="https://use.fontawesome.com/96c4d89611.js"></script>
  </head>
  <body>
<table id="doc-title" cellspacing="0" cellpadding="0">
  <tr>
  <td align="left" valign="top">
  <b>change-admin-password</b><br />
  </td>
  </tr>
</table>
<hr />

<table width="90%" id="top-nav" cellspacing="0" cellpadding="0">
	<colgroup>
		<col width="12%"/>
		<col width="12%"/>
		<col width="*"/>
	</colgroup>
	<tr>
		<td align="left">
		<a href="backup-domain.html">
			<span class="vector-font"><i class="fa fa-arrow-circle-left" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Previous</span>
		</a>
		</td>

		<td align="left">
		<a href="change-master-broker.html">
			<span class=" vector-font"><i class="fa fa-arrow-circle-right vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Next</span>
		</a>
		</td>

		<td align="right">
		<a href="toc.html">
			<span class=" vector-font"><i class="fa fa-list vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Contents</span>
		</a>
		</td>
	</tr>
</table>


<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p><a id="change-admin-password-1"></a><a id="GSRFM00004"></a><a id="change-admin-password"></a></p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_change_admin_password">change-admin-password</h2>
<div class="sectionbody">
<div class="paragraph">
<p>changes the administrator password</p>
</div>
<div id="sthref45" class="paragraph">
<p>Synopsis</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">asadmin [asadmin-options] change-admin-password [--help]
[--domaindir domain-root-dir [--domain_name domain-name]]</code></pre>
</div>
</div>
<div id="sthref46" class="paragraph">
<p>Description</p>
</div>
<div class="paragraph">
<p>The <code>change-admin-password</code> subcommand modifies the administrator
password. The <code>change-admin-password</code> subcommand is interactive because
the subcommand prompts the user for the old administrator password, for
the new administrator password, and for confirmation of the new
administrator password. The new password must contain at least 8
characters.</p>
</div>
<div class="paragraph">
<p>If the only user is an anonymous user without a password, this
subcommand fails.</p>
</div>
<div class="paragraph">
<p>If a blank password is provided, this subcommand fails if secure
administration is enabled.</p>
</div>
<div class="paragraph">
<p>For security purposes, create a password-protected user account with
administrator privileges. To create this account, use the
<a href="create-file-user.html#create-file-user-1"><code>create-file-user</code>(1)</a> or
the Administration Console. After creating this user account, remove the
anonymous user to restrict access to \{product---name} settings.</p>
</div>
<div class="paragraph">
<p>If more than one administrator is configured for \{product---name}, you
must run the <code>asadmin</code> command with the <code>--user</code> option to change the
password for that user. For more information, see the examples in this
help page.</p>
</div>
<div class="paragraph">
<p>This subcommand is supported in local mode and remote mode. If the
<code>--domaindir</code> or <code>--domain_name</code> option is specified, the
<code>change-admin-password</code> subcommand operates in local mode. If neither
option is specified, the <code>change-admin-password</code> subcommand first
attempts to operate in remote mode. If neither option is specified and
the DAS is not running, the <code>change-admin-password</code> subcommand operates
in local mode, using the default values for the <code>--domaindir</code> and
<code>--domain_name</code> options.</p>
</div>
<div id="sthref47" class="paragraph">
<p>Options</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">asadmin-options</dt>
<dd>
<p>Options for the <code>asadmin</code> utility. For information about these
options, see the <a href="asadmin.html#asadmin-1m"><code>asadmin</code>(1M)</a> help page.</p>
</dd>
<dt class="hdlist1"><code>--help</code></dt>
<dt class="hdlist1"><code>-?</code></dt>
<dd>
<p>Displays the help text for the subcommand.</p>
</dd>
<dt class="hdlist1"><code>--domaindir</code></dt>
<dd>
<p>Specifies the parent directory of the domain specified in the
<code>--domain_name</code> option. When this option is used, the
<code>change-admin-password</code> subcommand operates in local mode.</p>
</dd>
<dt class="hdlist1"><code>--domain_name</code></dt>
<dd>
<p>Specifies the domain of the admin user.<br>
This option is not required if the directory specified by the
<code>--domaindir</code> option contains only one domain.</p>
</dd>
</dl>
</div>
<div id="sthref48" class="paragraph">
<p>Examples</p>
</div>
<div class="paragraph">
<p><a id="GSRFM447"></a><a id="sthref49"></a></p>
</div>
<div class="paragraph">
<p>Example 1   Changing the Administrator Password For a Single User in
Multimode</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">asadmin --user admin
asadmin&gt; change-admin-password
Please enter the old admin password&gt;
Please enter the new admin password&gt;
Please enter the new admin password again&gt;
Command change-admin-password executed successfully.</code></pre>
</div>
</div>
<div class="paragraph">
<p><a id="GSRFM448"></a><a id="sthref50"></a></p>
</div>
<div class="paragraph">
<p>Example 2   Changing the Administrator Password For a Single User in
Single Mode</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">asadmin --user admin change-admin-password
Please enter the old admin password&gt;
Please enter the new admin password&gt;
Please enter the new admin password again&gt;
Command change-admin-password executed successfully.</code></pre>
</div>
</div>
<div id="sthref51" class="paragraph">
<p>Exit Status</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">0</dt>
<dd>
<p>command executed successfully</p>
</dd>
<dt class="hdlist1">1</dt>
<dd>
<p>command failed</p>
</dd>
</dl>
</div>
<div id="sthref52" class="paragraph">
<p>See Also</p>
</div>
<div class="paragraph">
<p><a href="asadmin.html#asadmin-1m"><code>asadmin</code>(1M)</a></p>
</div>
<div class="paragraph">
<p><a href="create-file-user.html#create-file-user-1"><code>create-file-user</code>(1)</a>,
<a href="delete-password-alias.html#delete-password-alias-1"><code>delete-password-alias</code>(1)</a>,
<a href="list-password-aliases.html#list-password-aliases-1"><code>list-password-aliases</code>(1)</a>,
<a href="update-password-alias.html#update-password-alias-1"><code>update-password-alias</code>(1)</a></p>
</div>
</div>
</div>

<hr />

<table width="90%" id="bottom-nav" cellspacing="0" cellpadding="0">
	<colgroup>
		<col width="12%"/>
		<col width="12%"/>
		<col width="*"/>
	</colgroup>
	<tr>		
		<td align="left">
		<a href="backup-domain.html">
			<span class=" vector-font"><i class="fa fa-arrow-circle-left" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Previous</span>
		</a>
		</td>

		<td align="left">
		<a href="change-master-broker.html">
			<span class="vector-font"><i class="fa fa-arrow-circle-right vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Next</span>
		</a>
		</td>

		<td align="right">
		<a href="toc.html">
			<span class="vector-font"><i class="fa fa-list vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Contents</span>
		</a>
		</td>
	</tr>
</table>

<span id="copyright">
        <img src="/resource/reference/img/eclipse_foundation_logo_tiny.png" height="20px" alt="Eclipse Foundation Logo" align="top"/>&nbsp;            
        <span >Copyright&nbsp;&copy;&nbsp;2019,&nbsp;Oracle&nbsp;and/or&nbsp;its&nbsp;affiliates.&nbsp;All&nbsp;rights&nbsp;reserved.</span>
</span>

</body>
</html>
